package cn.cmeizu.spring6.resource.controller;

import cn.cmeizu.spring6.resource.service.UserService;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Controller;

/**
 * @author cmeizu
 * @date 2023/2/9 22:58
 */
@Controller(value = "myUserController")
public class UserController {

  /**
   * 定义service属性: 不指定名称就根据属性名称注入
   */
  @Resource
  private UserService myUserService;


  public void testController() {
    System.out.println("执行controller的方法");
    myUserService.addUserService();
  }
}
